package com.lyz.dataStructure.algorithm.VIPKID2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 16:50
 * @Description:
 **/

import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/9/3 16:50
 *@Description:
 **/
public class 整数二进制表示 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(returnNum(n));
    }

    public static int returnNum(int n ){
        int count=0;
        while(n!=0){
            count++;
            n = n&(n-1);
        }
        return count;
    }
}
